// pages/wode/wode.js
let util = require("../../utils/util.js");
var baseImgUrl = util.baseImgUrl;
let app=getApp();
Page({
  /**
   * 页面的初始数据
   */
  data: {
    topBg:baseImgUrl+"moren_bg.jpg",//顶部图片
    userlogo:baseImgUrl+"userlogo.png",//用户头像
    arrowSrc:baseImgUrl+"arrow_r_grey.png",//箭头
    navList:[{
      id:0,
      src:"../images/wenzhang.png",
      navName:"文章收藏"
    }, {
        id: 1,
        src: "../images/daren.png",
        navName: "关注达人"
      }, {
        id: 2,
        src: "../images/zuji.png",
        navName: "我的足迹"
      }, {
        id: 3,
        src: "../images/fensi.png",
        navName: "我的粉丝"
      }],
     bodyList: [{
      id: 0,
      src: "../images/bobaohao.png",
      navName: "申请播报号"
    }, {
      id: 1,
      src: "../images/haoyou.png",
      navName: "邀请好友"
    }, {
      id: 2,
      src: "../images/chengshi.png",
      navName: "申请开通城市"
    }, {
      id: 3,
      src: "../images/xiaoxi.png",
      navName: "消息通知"
    },]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that=this;
    var nickName = app.globalData.userInfo.nickName;
   
    that.setData({
      nickName: nickName
    })

  },



   /**********跳转到我的关注*************/ 
  myconcern:function(e){
    var that=this;
    var thisid=e.currentTarget.id;
    wx.navigateTo({
      url: '/pages/myconcern/myconcern?thisid='+thisid
    })
    

  },

  /***********进入二级菜单*********** */
  gonext:function(e){
    var that=this;
    var thisid=e.currentTarget.id*1;
    console.log(thisid);
     switch(thisid){
       case 0:wx.navigateTo({
         url: '/pages/apply/apply',
       });break;
       case 1: wx.updateShareMenu({
         withShareTicket: true,
         success() {
           console.log("zhuanfa");
          }
       }); break;
       case 2: wx.navigateTo({
         url: '/pages/city/city',
       }); break;
       case 3: wx.navigateTo({
         url: '/pages/messages/messages',
       }); break;
       default:break;

     }
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function (res) {
   
      if (res.from === 'button') {
        // 来自页面内转发按钮
        console.log(res.target)
      }
      return {
        title: '同城看点',
        path: '/pages/wode/wode',
        imagesUrl:"/pages/images/moren.png"
      }
    
  }
})